package com.zmsk.zmio.handler;

import android.content.Context;

import com.ys.wiegand.Wiegand;
import com.zmsk.zmio.inter.IIOHandler;

public class YSWiegand implements IIOHandler {
    @Override
    public void initIOControl(Context context) {

    }

    @Override
    public void stopIOControl(Context context) {
    }

    @Override
    public void noticeGateOpen(Context context, String idNumber) {
        try {
            long id = Long.parseLong(idNumber);
            Wiegand.outputOpen();
            Wiegand.Output34(id);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public void noticeGateClose(Context context) {
        // Wiegand do close by itself.

    }

    @Override
    public void noticeWhiteLedOn(Context context) {

    }

    @Override
    public void noticeWhiteLedOff(Context context) {

    }

    @Override
    public void noticeInfraredLedOn(Context context) {

    }

    @Override
    public void noticeInfraredLedOff(Context context) {

    }

    @Override
    public void noticeRedLedOn(Context context) {

    }

    @Override
    public void noticeRedLedOff(Context context) {

    }

    @Override
    public void noticeGreenLedOn(Context context) {

    }

    @Override
    public void noticeGreenLedOff(Context context) {

    }

    @Override
    public void handleSlientInstall(String path) {

    }
}
